package com.crr.controller;

import com.crr.apis.PayFeignApi;
import com.crr.entities.PayDTO;
import com.crr.ret.ResultData;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/feign")
public class OrderGateWayController {
    @Resource
    private PayFeignApi payFeignApi;


    @GetMapping("/pay/gateway/get/{id}")
    public ResultData<PayDTO> getPayById(@PathVariable("id") Integer id) {
        return payFeignApi.getById2(id);
    }

    @GetMapping("/pay/gateway/get/info")
    public ResultData<String> getInfo() {
        return payFeignApi.getInfo();
    }

}
